<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!--返回错误信息-->
<?php echo validation_errors(); ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <?php
    $title = [
        'title' => '编辑进货单',
    ];
    $this->load->view('/admin/common/header', $title);
    ?>
</head>

<body data-type="widgets">
<script src="/assets/js/theme.js"></script>
<div class="am-g tpl-g">

    <!--    头部   侧边菜单-->
    <?php $this->load->view('/admin/common/bodyLeft'); ?>

    <!-- 内容区域 -->
    <div class="tpl-content-wrapper">
        <div class="row-content am-cf">
            <div class="row">
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                    <div class="widget am-cf">
                        <div class="widget-head am-cf">
                            <div class="widget-title  am-cf">
                                <ol class="am-breadcrumb am-breadcrumb-slash">
                                    <li><a href="/admin/procurement/index?page=1">采购管理</a></li>
                                    <li><a href="/admin/procurement/purchaseOrder?page=1">采购进货单</a></li>
                                    <li class="am-active">编辑进货单</li>
                                </ol>
                            </div>
                        </div>
                        <form action="/admin/procurement/purchaseEdit" method="post" enctype="multipart/form-data" class="am-form am-text-sm">
                            <input type="hidden" name="type" value="采购需求单">
                            <div class="widget-body  am-fr">
                                <div class="tpl-table-black-operation">
                                    <a href="javascript:void(0);" class="tpl-table-black-operation-del">
                                        基本信息
                                    </a>
                                </div>

                                <div style="margin-top: 20px">
                                    <div class="am-g">
                                        <!-- Row start -->
                                        <div class="am-u-sm-12">
                                            <div class="am-g">
                                                <div class="am-u-md-6">
                                                    <!--                                                    <form class="am-form am-text-sm">-->
                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-text-1">进货单编号：</label>
                                                            <input class="am-u-md-10 form-control" name="purchaseCode" value="<?php echo $list['purchaseCode'] ?>"
                                                                   id="doc-ipt-text-1" disabled>
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-text-1">进货单编号：</label>
                                                            <input class="am-u-md-10 form-control" name="name" value="<?php echo $list['name'] ?>"
                                                                   id="doc-ipt-text-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">单据时间</label>
                                                            <input class="am-u-md-10 form-control" name="createTime" value="<?php echo $list['createTime'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">所属项目</label>
                                                            <input class="am-u-md-10 form-control" name="source" value="<?php echo $list['source'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ta-1">申请原因</label>
                                                            <textarea class="am-u-md-10 form-control" rows="5" name="content"
                                                                      style="-webkit-border-radius: ;-moz-border-radius: ;border-radius: 3px;width:83%"
                                                                      id="doc-ta-1"><?php echo $list['content'] ?>
                                                            </textarea>
                                                        </div>
                                                    </div>
                                                    <!--                                                    </form>-->
                                                </div>

                                                <div class="am-u-md-6">
                                                    <!--                                                    <form class="am-form am-text-sm">-->
                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">关联需求单：</label>
                                                            <input class="am-u-md-10 form-control" name="needCode" value="<?php echo $list['needCode'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">供应商：</label>
                                                            <input class="am-u-md-10 form-control" name="supplier" value="<?php echo $list['supplier'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">期望到货时间</label>
                                                            <input class="am-u-md-10 form-control" name="endTime" value="<?php echo $list['endTime'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">制单人：</label>
                                                            <input class="am-u-md-10 form-control" name="createMan" value="<?php echo $list['createMan'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <!--                                                    </form>-->
                                                </div>
                                            </div>
                                        </div>
                                        <!-- Row end -->
                                    </div>
                                    <hr>
                                </div>

                                <div class="tpl-table-black-operation">
                                    <a href="javascript:void(0);" class="tpl-table-black-operation-del">
                                        详细信息
                                    </a>
                                </div>

                                <div style="margin-top: 20px">
                                    <div class="am-u-sm-12">
                                        <table width="100%"
                                               class="am-table am-table-compact am-table-striped tpl-table-black "
                                               id="example-r">
                                            <thead>
                                            <tr>
                                                <th>序号</th>
                                                <th>商品编码</th>
                                                <th>商品名称</th>
                                                <th>商品规格</th>
                                                <th>单位</th>
                                                <th>进货数量</th>
                                                <th>进货单价</th>
                                                <th>进货金额</th>
                                                <th>备注</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr class="gradeX">
                                                <input type="hidden" name="goods[]" value="1">
                                                <td>1</td>
                                                <td>Amaze UI 模式窗口</td>
                                                <td>张鹏飞</td>
                                                <td>2016-09-26</td>
                                                <td>2016-09-26</td>
                                                <td>2016-09-26</td>
                                                <td>2016-09-26</td>
                                                <td>2016-09-26</td>
                                                <td>2016-09-26</td>
                                            </tr>
                                            <tr class="even gradeC">
                                                <input type="hidden" name="goods[]" value="2">
                                                <td>2</td>
                                                <td>Amaze UI 模式窗口</td>
                                                <td>张鹏飞</td>
                                                <td>2016-09-26</td>
                                                <td>2016-09-26</td>
                                                <td>2016-09-26</td>
                                                <td>2016-09-26</td>
                                                <td>2016-09-26</td>
                                                <td>2016-09-26</td>
                                            </tr>
                                            <!-- more data -->
                                            </tbody>
                                        </table>
                                        <hr>
                                    </div>
                                    <div class="am-u-lg-12 am-cf">
                                        <div class="am-fr">
                                            <ul class="am-pagination tpl-pagination" id="paging">
                                                <!--                                                                                        <li class="am-active"><a href="#">1</a></li>-->

                                            </ul>
                                        </div>
                                    </div>
                                </div>

                                <div class="tpl-table-black-operation">
                                    <a href="javascript:void(0);" class="tpl-table-black-operation-del">
                                        合同信息
                                    </a>
                                </div>

                                <div style="margin-top: 20px">
                                    <div class="am-g">
                                        <!-- Row start -->
                                        <div class="am-u-sm-12">
                                            <div class="am-g">
                                                <div class="am-u-md-6">
                                                    <!--                                                    <form class="am-form am-text-sm">-->
                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-text-1">采购金额(总计)小写</label>
                                                            <input class="am-u-md-10 form-control" name="amountSmall" value="<?php echo $contractInfo['amountSmall'] ?>"
                                                                   id="doc-ipt-text-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">交货方式</label>
                                                            <input class="am-u-md-10 form-control" name="deliveryType" value="<?php echo $contractInfo['deliveryType'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">运费负担</label>
                                                            <input class="am-u-md-10 form-control" name="freight" value="<?php echo $contractInfo['freight'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">交货时间</label>
                                                            <input class="am-u-md-10 form-control" name="jiaohuoTime" value="<?php echo $contractInfo['jiaohuoTime'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">支付方式</label>
                                                            <input class="am-u-md-10 form-control" name="payWay" value="<?php echo $contractInfo['payWay'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ta-1">收货地址及联系人</label>
                                                            <textarea class="am-u-md-10 form-control" rows="5" name="address"
                                                                      style="-webkit-border-radius: ;-moz-border-radius: ;border-radius: 3px;width:83%"
                                                                      id="doc-ta-1"><?php echo $contractInfo['address'] ?>
                                                            </textarea>
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ta-1">免责事项:</label>
                                                            （鼠标移动到标签上字段弹窗显示事项内容）
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ta-1">其他事项:</label>
                                                            （鼠标移动到标签上字段弹窗显示事项内容）
                                                        </div>
                                                    </div>
                                                    <!--                                                    </form>-->
                                                </div>

                                                <div class="am-u-md-6">
                                                    <!--                                                    <form class="am-form am-text-sm">-->
                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">采购金额（总计）大写：</label>
                                                            <input class="am-u-md-10 form-control" name="amountBig" value="<?php echo $contractInfo['amountBig'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">交货地点：</label>
                                                            <input class="am-u-md-10 form-control" name="deliveryAddress" value="<?php echo $contractInfo['deliveryAddress'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">物流保价：</label>
                                                            <input class="am-u-md-10 form-control" name="logistics" value="<?php echo $contractInfo['logistics'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">付款方式：：</label>
                                                            <input class="am-u-md-10 form-control" name="paymentWay" value="<?php echo $contractInfo['paymentWay'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">发票交付：：</label>
                                                            <input class="am-u-md-10 form-control" name="invoice" value="<?php echo $contractInfo['invoice'] ?>"
                                                                   id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <!--                                                    </form>-->
                                                </div>
                                            </div>
                                        </div>
                                        <!-- Row end -->
                                    </div>
                                    <hr>
                                </div>

                                <div class="tpl-table-black-operation">
                                    <a href="javascript:void(0);" class="tpl-table-black-operation-del">
                                        报价确认单
                                    </a>
                                </div>

                                <div style="margin-top: 20px">
                                    <div class="am-g">
                                        <!-- Row start -->
                                        <div class="am-u-sm-12">
                                            <div class="am-g">
                                                <div class="am-u-md-6">
                                                    <!--                                                    <form class="am-form am-text-sm">-->
                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-email-1">报价确认单：</label>
                                                            <input type="file" class="am-u-md-10 form-control" name="baojia" id="doc-ipt-email-1">
                                                        </div>
                                                    </div>

                                                    <!--                                                    </form>-->
                                                </div>
                                            </div>
                                        </div>
                                        <!-- Row end -->
                                    </div>
                                    <hr>
                                </div>

                                <div class="tpl-table-black-operation">
                                    <a href="javascript:void(0);" class="tpl-table-black-operation-del">
                                        付款信息
                                    </a>
                                </div>

                                <div style="margin-top: 20px">
                                    <div class="am-g">
                                        <!-- Row start -->
                                        <div class="am-u-sm-12">
                                            <div class="am-g">
                                                <div class="am-u-md-6">
                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-text-1">采购金额预付: </label>
                                                            <select data-am-selected="{btnSize: 'sm'}" name="prepay">
                                                                <option value="option1">请选择预付比例</option>
                                                                <option value="预付款30%">预付款30%</option>
                                                                <option value="预付款40%">预付款40%</option>
                                                                <option value="预付款50%">预付款50%</option>
                                                                <option value="预付款60%">预付款60%</option>
                                                            </select>
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-text-1">付款人员: </label>
                                                            <select data-am-selected="{btnSize: 'sm'}" name="payMan">
                                                                <option value="请选财务人员">请选财务人员</option>
                                                                <option value="王光明">王光明</option>
                                                                <option value="金碧波">金碧波</option>
                                                                <option value="XXXX">XXXX</option>
                                                            </select>
                                                        </div>
                                                    </div>

                                                    <div class="am-form-group">
                                                        <div class="am-g">
                                                            <label class="am-u-md-2 am-md-text-right am-padding-left-0"
                                                                   for="doc-ipt-text-1">付款确状态: </label>
                                                            <button type="button" class="am-btn am-btn-default">未确认</button>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                        <!-- Row end -->
                                    </div>
                                    <hr>
                                </div>
                                <!-- Row end -->
                            </div>
                    </div>

                    <div class="am-u-sm-9 am-u-sm-push-3">

                        <input type="submit" value="暂存" name="action" class="am-btn am-btn-primary tpl-btn-bg-color-success " style="width:220px;margin: 20px;">

                        <input type="submit" name="action" class="am-btn am-btn-primary tpl-btn-bg-color-success " style="width:220px;margin: 20px;">
                    </div>

                </div>


                </form>

            </div>
        </div>
    </div>
</div>
</div>
</div>
</div>
</div>
<script>
    function back() {
        window.history.back();
    }
</script>

<script src="/assets/js/amazeui.min.js"></script>
<script src="/assets/js/amazeui.datatables.min.js"></script>
<script src="/assets/js/dataTables.responsive.min.js"></script>
<script src="/assets/js/app.js"></script>

</body>

</html>